package com.xunshangwang.pinhaohuo.adapters;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.xunshangwang.pinhaohuo.R;

import java.util.List;

import tool.library.adapter.BaseRecyclerAdapter;

/**
 * Created by xzp on 16/2/16.
 */
public abstract class AddressNameAdapter<T> extends BaseRecyclerAdapter<T>{
    public AddressNameAdapter(Context context, List list) {
        super(context, list);
    }

    @Override
    public RecyclerView.ViewHolder onCreateHolder(ViewGroup parent, int viewType) {
        View view= LayoutInflater.from(getContext()).inflate(R.layout.address_name_item,parent,false);
        return new NameHolder(view);
    }
    public class NameHolder extends ClickableViewHolder{
        public TextView nameText;
        public NameHolder(View itemView) {
            super(itemView);
            nameText= (TextView) itemView.findViewById(R.id.address_name_text);
        }
    }
}
